import 'taro-ui/dist/style/components/modal.scss';
import {View, Image, Text} from '@tarojs/components';
import Taro from '@tarojs/taro';
import React, {Component} from 'react';
import {AtCurtain, AtModal} from 'taro-ui';
import 'taro-ui/dist/style/components/curtain.scss';
import './index.less';

import modelBg from '@/assets/image/common/blacklist-model-bg.png';
import codeImg from '@/assets/image/common/code.png';

export default class WMMask extends Component<any> {
  constructor(props) {
    super(props);
  }

  render() {
    let {isOpened, onConfirm, onCancel, hideISeeBtn = false} = this.props;
    return isOpened ? (
      <AtCurtain isOpened={isOpened} onClose={onCancel}>
        <View className="blacklistBox" style={{backgroundImage: `url("${modelBg}")`}}>
          <View className="title">温馨提示</View>
          <View className="content">您账户涉嫌有违规行为，请联系平台客服</View>
          <Image src={codeImg} showMenuByLongpress mode="widthFix" className="codeImg" />
          <View className="tip">长按识别添加客服微信</View>
          {!hideISeeBtn && (
            <View className="btnBox" onClick={onConfirm}>
              知道了
            </View>
          )}
        </View>
      </AtCurtain>
    ) : null;
  }
}
